{% for s in services %}
<tr class="{{ loop.cycle('odd', 'even') }}" id="{{s.0}}">
    <td class="padding10 first-collumn">
        {% if s.1.0 == 'active' or s.1.0 == 'RUNNING' %}
            <span title="{{s.0}} is started"><span class="serverUp server-status"></span></span>
        {% else %}
            {% if (s.1.0 == 'inactive' or s.1.0 == 'failed' or s.1.0 == 'activating' or s.1.0 == 'STOPPED')  and 'is not installed' not in s.3 %}
                <span title="{{s.0}} is stopped"><span class="serverDown server-status"></span></span>
            {% else %}
                <span title="{{s.0}} is not installed"><span class="serverNone server-status"></span></span>
            {% endif %}
        {% endif %}
        {{s.0[0]|upper}}{{s.0[1:]}}
    </td>
    <td class="padding10 first-collumn">
        {% if 'is not installed' in s.3 %}
            <a href="https://roxy-wi.org/services.py?service={{s.0.split('-')[2]}}#installation" title="{{s.0.split('-')[2]}} installation" target="_blank" class="link">Read about installation</a>
        {% else %}
        <a id="start-{{ s.0 }}" class="start" title="Start and enable {{s.0}} service">
            <span class="service-start" onclick="confirmAjaxServiceAction('start', '{{s.0}}')"></span>
        </a>
        <a id="restart-{{ s.2 }}" class="restart" title="Restart {{s.0}} service">
            <span class="service-reload service-restart" onclick="confirmAjaxServiceAction('restart', '{{s.0}}')"></span>
        </a>
        <a id="stop-{{ s.0 }}" class="stop" title="Stop and disable {{s.0}} service">
            <span class="service-stop" onclick="confirmAjaxServiceAction('stop', '{{s.0}}')"></span>
        </a>
        {% endif %}
    </td>
    <td>
        {% if 'is not installed' not in s.3 %}
        {{ s.3 }}
        {% endif %}
    </td>
    <td>
        {{ s.2 }}
    </td>
    <td></td>
</tr>
{% endfor %}